﻿@using QDT.Common
@using QDT.Core
@using QDT.MVC.UI
@model QDT.Common.IPagedList<QDT.Core.Orders.ChargeOrder>
@{
    ViewBag.Title = "充值明细";
}
<script src="../../Content/Default/JS/change.js" type="text/javascript"></script>
<link href="../../Content/Default/CSS/RechargeDetail.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $().ready(function () {
        $("#ui-chongzhimingxi a").addClass("a_class");
        $("#TransactionMingxi").css("background", "#e0524b");
        $("#TransactionMingxi i,#TransactionMingxi span").css("color", "white");
        $("#TransactionMingxi .san-jiaoxing").css("display", "block");
    });
</script>
@Html.Action("_UserBanner")
<div class="ui-body">
    <div class="ui-inner">
        <div class="ui-grid-row">
            @Html.Action("UserMenu", new { route = MenuRoute.TradeDetail })
            <div class="ui-grid-20">
                <div class="ui-box">
                    @Html.Partial("_JiaoyiMingxiTitle")
                    <div class="ui-table-container">
                        <table style="width: 100%">
                            <thead>
                                <tr>
                                    <th>
                                        时间
                                    </th>
                                    <th>
                                        编号
                                    </th>
                                    <th>
                                        金额
                                    </th>
                                    <th>
                                        资金渠道
                                    </th>
                                    <th>
                                        状态
                                    </th>
                                </tr>
                            </thead>
                            <tbody id="datalist">
                                @foreach (var o in Model)
                                {
                                    <tr>
                                        <td class="ui-tdtime">
                                            @o.CreateTime
                                        </td>
                                        <td class="ui-tdall">
                                            @o.ID
                                        </td>
                                        <td class="ui-tdall">
                                            @o.TotalPrice.ToMoney()
                                        </td>
                                        <td class="ui-tdall">
                                            @Html.F().GetPaymentInfo(o.PaymentKey)
                                        </td>
                                        <td class="ui-tdallf">
                                            @if (@o.InnerStatus == 0)
                                            {
                                                <span>未支付</span>
                                            }
                                            else if (@o.InnerStatus == 1)
                                            {
                                                if ((int)DateTime.Now.Subtract(@o.CreateTime).TotalHours > 1)
                                                {
                                                <span class="ui-tdallf">失效</span>
                                                }
                                                else
                                                {
                                                <span class="ui-tdallf">待处理</span>
                                                }
                                            }
                                            else if (@o.InnerStatus == 2)
                                            {
                                                <span class="ui-tdalls">完成</span>
                                            }
                                            else if (@o.InnerStatus == 3)
                                            {
                                                <span class="ui-tdallf">失败</span>
                                            }
                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
                <div style="text-align: center; margin-top: -10px;">@Html.ClientPager(Model)</div>
            </div>
        </div>
    </div>
</div>
<div style="margin-top: -3px;">@Html.Partial("_BindBottomImage")</div>
